/***2024-12-31 迷途小羔羊
* 用于编写行为基类
*/
namespace ghost
{
    export class BehaviorBase
    {
        protected _ai:AIBase;
        protected _behavior:number;
        protected _data:ISmartParam;
        protected _role:GameRole;
        constructor(ai:AIBase)
        {
            let s = this;
            s._ai = ai;
            s._data = s._ai._data;
            s._role = s._data.role;
        }
        /**执行行为*/
        public exc(t:number):void
        {

        }
        /**重置数据为初始状态*/
        public resetState():void
        {

        }
        /**清理数据*/
        public clear():void
        {

        }
        public behaviorOut(b:BehaviorBase, nextBehavior:BehaviorEnum):void
        {
            let s = this;
            s._ai.behaviorOut(b, nextBehavior);
        }    
        public dispose():void
        {
            let s = this;
            s._data = s._role = s._ai = null;
        }    
    }
}